﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Security.Principal;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Principal_Clientes : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LinkButton link = (LinkButton)this.Master.FindControl("LinkPrincipal");
        link.Visible = false;

        if (!IsPostBack)
        {
            IPrincipal p = HttpContext.Current.User;
            if (!p.IsInRole("Cliente"))
            {
                Session["Mensaje"] = "Usted no posee los permisos necesarios para ingresar a esta pagina";

                if (Session["Identificador"] != null)
                {
                    //ESTO NUNCA OCURRE
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }
        }
    }

    protected void btnPresupuesto_Click(object sender, EventArgs e)
    {
        Response.Redirect("Presupuesto.aspx");

    }

    protected void btnSolicitaReunion_Click(object sender, EventArgs e)
    {
        Response.Redirect("SolicitarReunion.aspx");
    }
    
    protected void btnMisEventos_Click(object sender, EventArgs e)
    {
        Response.Redirect("Eventos_de_Cliente.aspx");
    }

    protected void btnComentarioEvento_Click(object sender, EventArgs e)
    {

    }
}
